package com.pmcc.cj.socket;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * 创建名为“WebSocketConfig.java”的类来配置websocket，并继承抽象类“AbstractWebSocketMessageBrokerConfigurer”
 * 此类声明“@EnableWebSocketMessageBroker”的注解
 */
@Configuration
@Component
public class WebSocketConfig {
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }


}
